class MusicControl extends egret.Sprite{
	private musicOn:egret.Bitmap;
	private musicOff:egret.Bitmap;
	private st;
	public constructor(bl_OnOff) {
		super();
		this.musicOn=new egret.Bitmap(RES.getRes("musicOn_png"));
        this.addChild(this.musicOn);

		this.musicOff=new egret.Bitmap(RES.getRes("musicOff_png"));
        this.addChild(this.musicOff);

		if(bl_OnOff){
			this.musicOn.alpha=1;
			this.musicOff.alpha=0;
		}
		else{
			this.musicOn.alpha=0;
			this.musicOff.alpha=1;
		}
		this.touchEnabled=true;
		this.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.TB,this);
	}
	private TB(e:egret.TouchEvent){
		if(this.musicOn.alpha==1){
			this.musicOn.alpha=0;
			this.musicOff.alpha=1;
			MusicOnOff(false);
		}
		else{
			this.musicOn.alpha=1;
			this.musicOff.alpha=0;
			MusicOnOff(true);
		}
	}
}
declare function MusicOnOff(bl);